$(document).ready
(
	function()
	{
		checkLogon();
		setCheckLinkURL();
		setFCMMouseOverOut();
	}
	
);

function checkLogon()
{
			//logon message
	$("#message").slideUp(1000);
	if(!$("#SessionID"));
	else if($("#SessionID").val() == "")
	{
		$("#message").html("You are not currently logged on. Please enter a username and password above");
		$("#message").slideDown(1000);
		if($("#Action").val() == "logon")
			alert("Logon unsuccessful - please try again");
	}
}

function setCheckLinkURL()
{
	$("#LinkPreviewButton").click(checkLinkURL);
	$("#LinkPreviewButton").hover(function(){$(this).addClass("LinkPreviewButtonHover");},function(){$(this).removeClass("LinkPreviewButtonHover");});
	$("#InsertRecord_Links_URL").keyup(function(){$("#LinkPreview").hide();})
}

function checkLinkURL()
{
	theURL=$("#InsertRecord_Links_URL").val();
	window.open(theURL,"_blank");
}

function setFCMMouseOverOut()
{
	$("#FCMText,#FCMLogo").mouseover(function(){$("#FCMText").addClass("FCMTextHover");});
	$("#FCMText,#FCMLogo").mouseout(function(){$("#FCMText").removeClass("FCMTextHover");});
}
